Geoniche improvements from Pasha Phares.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 14 Apr 2006 22:44:11 +0000 (22:44 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Fri, 14 Apr 2006 22:44:11 +0000 (22:44 +0000)
gpsbabel/geoniche.c

index 385512cceaf85b28ec0ec66c10b34df0c0a07bc6..8e659d2e2d7e06711eb554dd7280b841fa952708 100644 (file)
@@ -601,20 +601,20 @@ wpt2icon(const waypoint *wpt)
 static char *
 geoniche_geostuff(const waypoint *wpt)
 {
-       char *gs = NULL, *tmp1, *tmp2;
+       char *gs = NULL, *tmp1, *tmp2, *tmp3;
        char tbuf[10240];
 
        if (!wpt->gc_data.terr) {
                return NULL;
        }
 
-       snprintf(tbuf, sizeof(tbuf), "\n%s by %s\n", gs_get_cachetype(wpt->gc_data.type), wpt->gc_data.placer);
+       snprintf(tbuf, sizeof(tbuf), "\n%s by %s\n\n", gs_get_cachetype(wpt->gc_data.type), wpt->gc_data.placer);
        gs = xstrappend(gs, tbuf);
 
        snprintf(tbuf, sizeof(tbuf), "Waypoint: %s %s\n", wpt->shortname, wpt->description);    
        gs = xstrappend(gs, tbuf);
 
-       snprintf(tbuf, sizeof(tbuf), "Difficulty %3.1f, Terrain: %3.1f\n", wpt->gc_data.diff/10.0, wpt->gc_data.terr/10.0);
+       snprintf(tbuf, sizeof(tbuf), "Difficulty %3.1f\nTerrain: %3.1f\n\n", wpt->gc_data.diff/10.0, wpt->gc_data.terr/10.0);
        gs = xstrappend(gs, tbuf);
 
        tmp1 = strip_html(&wpt->gc_data.desc_short);
@@ -622,8 +622,13 @@ geoniche_geostuff(const waypoint *wpt)
        gs = xstrappend(gs, tmp1);
        gs = xstrappend(gs, tmp2);
 
+       tmp3 = rot13(wpt->gc_data.hint);
+       snprintf(tbuf, sizeof(tbuf), "\n\nHint: %s\n", tmp3);
+       gs = xstrappend(gs, tbuf);
+
        xfree(tmp1);
        xfree(tmp2);
+       xfree(tmp3);
 
        return enscape(gs);
 }